<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>DataGrid Complex Toolbar - jQuery EasyUI Demo</title>
	<script type="text/javascript" src="__PUBLIC__/Resourse/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" charset="UTF-8" src="__PUBLIC__/Resourse/js/jquery.cookie.js"></script>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Resourse/themes/default/easyui.css" id="easyuiTheme">
	<script type="text/javascript" charset="UTF-8" src="__PUBLIC__/Resourse/js/changeEasyuiTheme.js"></script>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Resourse/themes/icon.css">
	<script type="text/javascript" src="__PUBLIC__/Resourse/js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Resourse/js/jquery.jqprint-0.3.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Resourse/js/common.js"></script>	
	<style type="text/css">  
        #studentfm{  
            margin:0;  
            padding:10px 10px 30px 5px;  
       }  
       .ftitle{  
            font-size:14px;  
            font-weight:bold;  
            padding:5px 0;  
            margin-bottom:10px;  
            border-bottom:1px solid #ccc;  
        }  
       .fitem{  
            margin-bottom:0px;  
       }  
        .fitem label{             
            width:120px;  
        }
        .formText {
        	border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;
        	width : 120px;
        } 
        .combo {
		  border-color: rgb(233, 230, 230);
		  background-color: #ffffff;
		} 
		.panel-header,
		.panel-body {
		  border-color: rgb(222, 223, 224);
		}
    </style>  
    <script type="text/javascript">  
      var url; 
      var orderUrl;
      var orderDetailUrl;
      
  
      function initPay(){
    	  $('#DD_KHMC').combobox('disable');
    	  $('#DD_SYYHQ').combobox('disable');
    	  $('#DD_DDZT').combobox('disable');
    	  $('#DD_ZFFS').combobox('disable');
    	  $('#DD_TJR').combobox('disable');
    	  $('#DD_SF').val($('#DD_YF').val()); 
    	  $('#DD_SF').focus();
      }
      
      //报名单结算
      function settlementOrder(){  
         var rows = $('#order_list_data').datagrid('getSelections');  
         var ids = '';
         var count =0;
         for(var i=0;i<rows.length;i++){
           if(rows[i].DD_DDZT == 'DDZT2'){
          	   ids += rows[i].Id + ',';
        	   count =count+1;
           }
         }
         ids = ids.substring(0, ids.length-1);//获取所有要删除的ID
          if (count !=0){  
          	$.messager.defaults.ok = "确定"; //改变默认按钮文字
          	$.messager.defaults.cancel = "取消"; //改变默认按钮文字
              $.messager.confirm('确认','确认要结算选中的' + count +' 个已缴费报名单吗?',function(r){             	
                 if (r){              	   
                    $.post('__URL__/settlementOrder/',{ids:ids},function(result){  
                          if (result.success){  
                        	  $.messager.alert('消息','操作成功!','info');
                             $('#order_list_data').datagrid('reload');    // reload the user data  
                          } else {  
                             $.messager.show({title: '错误',  msg: result.errorMsg});  
                         }  
                     },'json');  
                  }  
              });       	  
          }else{
        	  $.messager.alert('消息','请至少选择一个已缴费报名单!','info');
          }  
     } 
      
      
      //打印报名单
      function printOrder(){
   	    var rows = $('#order_list_data').datagrid('getSelections'); 
         if (rows.length == 1){  
            doPrint(rows[0].Id);
          }         
      }  
      
      //执行打印
      function doPrint(orderId){
        	$.post('__URL__/printOrder/',{orderID:orderId},function(result){           
                if (result.Id!=null){  
             	   renderPrintArea(result); //渲染
              	  $("#printArea").css('display','');
             	  $('#printArea').jqprint({ operaSupport: true });
                } else {  
                   $.messager.show({   // show error message  
                        title: '错误',  
                        msg: result.errorMsg  
                    });  
               }  
           	},'json'); 
      }       
      
      //渲染打印区域
      function renderPrintArea(result){
	   	   var _begin = '<div style="font-size:15px;font-weight:bold; padding:3px 0;margin-left:40px;margin-bottom:3px;border-bottom:1px solid #ccc;margin-top:10px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;知音学校收据</div>';
		   _begin += '<table width="90%" cellpadding="0" border="0"  align="center">';
		   _begin += '<tr><td><div class="fitem" style="font-size:10px;"><label>收费日期:</label><input name="DD_SFSJ_PRINT" id="DD_SFSJ_PRINT" value ="'+result.DD_SFSJ+'" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:120px" ></div></td>';
		   _begin +='<td style="padding:0px 0px 5px 110px;border:0px;"><div class="fitem" style="font-size:10px;"><label>订单号:</label><input name="DD_BH_PRINT" id="DD_BH_PRINT" value="'+result.DD_BH+'" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:130px"></div></td></tr>';
	   	   _begin += '<tr><td><div class="fitem" style="font-size:10px;"><label>学生姓名:</label><input name="DD_KHMC_PRINT" id="DD_KHMC_PRINT" value ="'+result.DD_KHMC+'" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:120px" ></div></td>';
		   _begin +='<td style="padding:0px 0px 5px 110px;border:0px;"><div class="fitem" style="font-size:10px;"><label>经手人:</label><input name="DD_SFR_PRINT" id="DD_SFR_PRINT" value="'+result.DD_SFR+'" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:130px"></div></td></tr>';
		   _begin +='<tr align="left"><td colspan="2" style="padding:3px 0px 3px 0px;" ><table width="87%" border="1" cellpadding="5" cellspacing="0px" style="border-collapse:collapse"><thead>'				   
		   _begin += '<tr align="left"><th style="font-size:10px;" width="150">课程名称</th><th style="font-size:10px;" width="50">单位</th><th style="font-size:10px;" width="50">数量</th><th  style="font-size:10px;" width="50">单价</th><th style="font-size:10px;" width="50">折扣</th><th style="font-size:10px;" width="10px" height="10">应付金额</th></tr>';

		   var courseTableTr = '';
		   var courses = result.courses;
		   for(var i=0;i<courses.length;i++){
			   courseTableTr += '<tr align="left"><th style="font-size:10px;">'+courses[i].LS_KCMC+'</th><th style="font-size:10px;">'+courses[i].LS_KCDWMC+'</th><th style="font-size:10px;">'+courses[i].LS_SL+'</th><th style="font-size:10px;">'+courses[i].LS_KCJG+'</th><th style="font-size:10px;">'+courses[i].LS_ZK+'</th><th style="font-size:10px;">'+courses[i].LS_YFJE+'</th></tr>'
		   }
		   courseTableTr +='<tr align="left"><th style="font-size:10px;">合计</th><th></th><th></th><th></th><th></th><th style="font-size:10px;">'+result.DD_ZJE+'</th></tr>';
		   courseTableTr +='<tr align="left"><th style="font-size:10px;">折扣</th><th></th><th></th><th></th><th></th><th style="font-size:10px;">'+result.DD_ZK+'</th></tr>';
		   courseTableTr +='<tr align="left"><th style="font-size:10px;">应付</th><th></th><th></th><th></th><th></th><th style="font-size:10px;">'+result.DD_YF+'</th></tr>';
		   courseTableTr +='</thead></table></td></tr>';
		   courseTableTr +='<tr><td></td> <td style="padding:0px 0px 0px 110px;border:0px;"> <div class="fitem" style="font-size:10px;"><label>收款金额:</label><input name="DD_KHMC1" id="DD_KHMC1" value="'+result.DD_SF+'" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:116px" > '				   
		   courseTableTr+='</div></td>	</tr> </table> ';
		  $("#printArea").html(_begin + courseTableTr);	
      }
      
      
       $(window).resize(function(){  
        	$('#order_list_data').datagrid('resize');  
       });   
       
       
       //设置分页
       $(function(){
           $("#order_list_data").datagrid({
        	   rowStyler:function(index,row){    
        	        if (row.DD_DDZT == 'DDZT2'){  //表明未结算  
        	            return 'color:red;font-weight:bold;';    
        	        }    
        	   },  
        	    onDblClickRow: function(rowIndex) {
        	    $("#order_list_data").datagrid('selectRow',rowIndex);
        	     var currentRow = $('#order_list_data').datagrid('getSelected'); 
        	     
                 $('#dlg_order').dialog('open').dialog('setTitle','报名单信息');  
                 $('#orderfm').form('load',currentRow);  
				 disableForm('orderfm',true);//禁用表单
				 
                  //加载报名单明细
                  var queryParams = $('#order_details_data').datagrid('options').queryParams; 
                  queryParams.LS_DDBH = $("#DD_BH").val();
                  $('#order_details_data').datagrid('reload'); 

        	     }
           });
           
    	 	//设置分页控件  
           var p = $('#order_list_data').datagrid('getPager');  
           $(p).pagination({  
               pageSize: 10,//每页显示的记录条数，默认为10  
               pageList: [1,10,20,30],//可以设置每页记录条数的列表  
               beforePageText: '第',//页数文本框前显示的汉字  
               afterPageText: '页    共 {pages} 页',  
               displayMsg: '当前显示 {from} - {to} 条记录   共 {total} 条记录'
           }); 
         
           //学生combogird
           $('#DD_KHMC').combogrid({
				panelWidth:420,
				idField:'XS_XM', //ID字段
			    textField:'XS_XM', //显示的字段
			    url:"__URL__/studentList/",
			    fitColumns: true,
				striped: true,
				editable:true,
				pagination : true,//是否分页
				rownumbers:true,//序号
				collapsible:false,//是否可折叠的
				fit: true,//自动大小
				method:'post',
				afterPageText: '页    共 {pages} 页',  
			    columns:[[
			        {field:'XS_XM',title:'姓名',width:100},
			        {field:'XS_PY',title:'拼音',width:80},
			        {field:'XS_XH',title:'学号',width:120},
			        {field:'XS_JZXM',title:'家长姓名',width:100}
			    ]],
			    onSelect:function(sel,obj){
			    	$('#DD_KHBH').val(obj.XS_XH);
			    },
				keyHandler: {
		                query: function(q) {
		                    //动态搜索
		                    $('#DD_KHMC').combogrid("grid").datagrid("reload", {'KHMC': q });
		                    $('#DD_KHMC').combogrid("setValue", q);
		                }
		            }
			});
           var dd_khmc_grid=$("#DD_KHMC").combogrid("grid");
           $(dd_khmc_grid).datagrid('getPager').pagination({     
               pageSize: 5,//每页显示的记录条数，默认为10     
               pageList: [5,10],//可以设置每页记录条数的列表     
               beforePageText: '第',//页数文本框前显示的汉字     
               afterPageText: '共 {pages} 页 ',     
               displayMsg: '显示 {from}-{to} 条',   
           });  
           
           //优惠combogird
           $('#DD_SYYHQ').combogrid({
				panelWidth:600,
				idField:'YHK_BH', //ID字段
			    textField:'YHK_BH', //显示的字段
			    url:"__URL__/couponList/",
			    fitColumns: true,
				striped: true,
				editable:true,
				pagination : true,//是否分页
				rownumbers:true,//序号
				collapsible:false,//是否可折叠的
				fit: true,//自动大小
				method:'post',
				afterPageText: '页    共 {pages} 页',  
			    columns:[[
			        {field:'YHK_BH',title:'编号',width:100},
			        {field:'YHK_MC',title:'名称',width:100},
			        {field:'YHK_YHTJ',title:'优惠条件',width:80},
			        {field:'YHK_LX',title:'优惠类型',width:80,formatter:function(value,rowData,rowIndex){ if(value == '1'){ return '减现'} else { return '折扣'}}},
			        {field:'YHK_JE',title:'优惠金额',width:80},
			        {field:'YHK_PPMC',title:'课程名称',width:100},
			        {field:'YHK_KSSJ',title:'开始时间',width:100},
			        {field:'YHK_JSSJ',title:'过期时间',width:100}
			    ]],
			    onSelect:function(sel,obj){
			    	computeCoupon(obj.YHK_LX,obj.YHK_JE); //计算优惠
			    }
			});
           
           var dd_syyhq_grid=$("#DD_SYYHQ").combogrid("grid");
           $(dd_syyhq_grid).datagrid('getPager').pagination({     
               pageSize: 5,//每页显示的记录条数，默认为10     
               pageList: [5,10],//可以设置每页记录条数的列表     
               beforePageText: '第',//页数文本框前显示的汉字     
               afterPageText: '共 {pages} 页 ',     
               displayMsg: '显示 {from}-{to} 条',   
           });   
       }); 
       
       //根据优惠编号计算优惠
       function  computeCoupon(YHK_LX,YHK_JE){
     	  var DD_ZJE = Number($("#DD_ZJE").val());//总金额
     	  if(DD_ZJE != 0){
         	  var DD_YF = DD_ZJE;//应付
         	  var DD_ZK = Number(0);//折扣
         	  if(YHK_LX == 1){ //直接减现
         		 DD_ZK = Number(YHK_JE);
         		 DD_YF = DD_ZJE - DD_ZK;
         	  }else{
         		 DD_ZK = DD_ZJE*(Number(100)-Number(YHK_JE)*10)*0.01;
         		 DD_YF = DD_ZJE - DD_ZK;
         	  }
              $("#DD_ZK").val(DD_ZK);
              $("#DD_YF").val(DD_YF);//课程价格 
     	  }         
       }
       //根据条件查询订单信息
       function searchOrder(){   	   
   		   var DD_DDZT_SEARCH = $("#DD_DDZT_SEARCH").combobox('getValue');
   		   var DD_DDZT = (DD_DDZT_SEARCH==0)?null:DD_DDZT_SEARCH;	

   		   var queryParams = $('#order_list_data').datagrid('options').queryParams; 
   		   queryParams.DD_BH = $("#DD_BH_SEARCH").val();
   		   queryParams.DD_KHBH = $("#DD_KHBH_SEARCH").val();  	   
   		   queryParams.DD_KHMC = $("#DD_KHMC_SEARCH").val();
   		   queryParams.DD_PPMC = $("#DD_PPMC_SEARCH").val();
   		   queryParams.DD_DDZT = DD_DDZT;
   		
   		   $('#order_list_data').datagrid('options').queryParams = queryParams; 
   		   $('#order_list_data').datagrid('reload'); 
       }
             
    </script>  
</head>
<body class="easyui-layout" style="border-width:50px;margin:0">
	<div id="mainPanle"  region="center"  border="false" >
	<table id ="order_list_data" class="easyui-datagrid" style="overflow: hidden;height:auto;margin:0"
			data-options="title:'报名单列表',border:true,striped:true,nowrap:false,fit:true,rownumbers:true,pagination:true,singleSelect:false,url:'__URL__/readOrder/',toolbar:'#tb'" >
		<thead>
			<tr>
				<th data-options="field:'checkbox',checkbox:true" id="checkedAll"></th>	
				<th data-options="field:'DD_BH',fitColumns: true,width:120,align:'left'">报名单号</th>
				<th data-options="field:'DD_KHBH',fitColumns: true,width:100,align:'left'">学生编号</th>
				<th data-options="field:'DD_KHMC',fitColumns: true,width:80,align:'left'">学生名称</th>
				<th data-options="field:'DD_PPMC',fitColumns: true,width:180,align:'left'">课程名称</th>
				<th data-options="field:'DD_SL',fitColumns: true,width:60,align:'left'">课程数量</th>
				<th data-options="field:'DD_ZJE',itColumns: true,width:60,align:'left'">总金额 </th>
				<th data-options="field:'DD_ZK',itColumns: true,width:60,align:'left'">折扣金额</th>
				<th data-options="field:'DD_YF',itColumns: true,width:60,align:'left'">应付 </th>
				<th data-options="field:'DD_SF',itColumns: true,width:60,align:'left'">实付</th>
				<th data-options="field:'DD_ZFFS',itColumns: true,width:80,align:'left',hidden:true">支付方式</th>
				<th data-options="field:'ZFFS',itColumns: true,width:80,align:'left'">支付方式</th>
				<th data-options="field:'DD_ZD',itColumns: true,width:100,align:'left',hidden:true">订单来源</th>
				<th data-options="field:'ZD',itColumns: true,width:100,align:'left'">订单来源</th>				
				<th data-options="field:'DD_CJSJ',itColumns: true,width:130,align:'left'">时间</th>
				<th data-options="field:'DD_CJRMC',itColumns: true,width:80,align:'left'">创建人</th>
				<th data-options="field:'DD_DDZT',itColumns: true,width:70,align:'left',hidden:true">报名单状态</th>
				<th data-options="field:'DDZT',itColumns: true,width:70,align:'left'">状态</th>
			</tr>
		</thead>
	</table>
	<div id="tb" style="padding:0px;height:auto">
		<div style="margin-bottom:0px">
		<table>
			<tr>
				<td><a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="settlementOrder()">结算</a></td>
				<td><a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" plain="true" onclick="printOrder()">打印</a> </td>
			<!--  	<td><a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editOrder()">修改</a> </td>
				<td><a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyOrder()">删除</a></td>-->
			</tr>  
			</table>
		</div>
	<div>
			<form id="stu_search_form" method="post" novalidate> 
			<table cellspacing="1">
				<tr>
					<td>
					     <div class="fitem">  
			                <label>报名单号:</label>  
							<input name="DD_BH_SEARCH" id="DD_BH_SEARCH" class="easyui-validatebox searchText" >
			          	 </div>
					</td>
					<td>
						<div class="fitem">  
			                <label>学号:</label>  
							<input class="easyui-validatebox searchText" id="DD_KHBH_SEARCH" name="DD_KHBH_SEARCH" >
			          	 </div>
					</td>
					<td>
						<div class="fitem">  
		                	<label>学生姓名:</label>  
							<input class="easyui-validatebox searchText" id="DD_KHMC_SEARCH" name="DD_KHMC_SEARCH" >
		           		</div>
					</td>
					<td>
						<div class="fitem">  
			                <label>报名课程:</label>  
							<input name="DD_PPMC_SEARCH" id="DD_PPMC_SEARCH" class="easyui-validatebox searchText" >
			          	 </div>
					</td>
					<td>
						<div class="fitem">  
		                	<label>订单状态:</label>  
							<input class="easyui-combobox searchText" id="DD_DDZT_SEARCH" name="DD_DDZT_SEARCH" 
							data-options="valueField:'ITEM_KEY',textField:'text',url:'__URL__/getDDZT/'">
		           		</div>
					</td>					
					<td>
					<a href="javascript:searchOrder()" class="easyui-linkbutton" iconCls="icon-search">查询</a>
					</td>
				</tr>
			</table>			
			</form>
		</div>		
	</div>
	</div>
	
	<!-- 报名单信息 -->
	<div id="dlg_order" class="easyui-dialog" style="width:960px;height:470px;padding:5px;" data-options="iconCls:'icon-save',resizable:true,modal:true"
            closed="true" buttons="#dlg_order_buttons">  
        <div class="ftitle">报名信息</div>  
        <form id="orderfm" method="post" novalidate>  
        <input name="Id" id="Id" class="easyui-validatebox formText" type="hidden">  
        <input name="DD_BH" id="DD_BH" class="easyui-validatebox formText" type="hidden">
        <input name="DD_ZD" id="DD_ZD" class="easyui-validatebox formText" type="hidden">    
        <input name="DD_CJSJ" id="DD_CJSJ" class="easyui-validatebox formText" type="hidden">      
            <table cellspacing="10">
            <tr>
	           <!--<td>            
		             <div class="fitem">  
		                <label>报名单号:</label>  
		                <input name="DD_BH" class="easyui-validatebox formText">      
		            </div>   
	            </td>-->
	            <td>            
		            <div class="fitem">  
		                <label>学生姓名:</label>  
		                <input name="DD_KHMC" id="DD_KHMC" class="easyui-combogrid formText"  style ="width:120px" required="true" missingMessage="不能为空" >  
		            </div>    
	            </td>
	            <td>           
		             <div class="fitem">  
		                <label>学生学号:</label>  
		               <input name="DD_KHBH" class=" easyui-validatebox formText" id= "DD_KHBH" readOnly="readOnly">  
		            </div>  
	            </td>
	            <td colspan ="2">            
		           <div class="fitem">  
		                <label>发票:</label>  
		                <INPUT type="radio" name="DD_FP" id= "DD_FP" value="0"   onclick="getRadio(this.value)">不开
		                <INPUT type="radio" name="DD_FP" id= "DD_FP" value="1"  onclick="getRadio(this.value)">开						
		           </div> 
	            </td>              
            </tr>  
            <tr id="fptt_tr" style="display:none">
            <td colspan="4">           
		           <div class="fitem">  
		                <label>发票抬头:</label>  
						<input name="DD_FPTT" id="DD_FPTT" class="easyui-validatebox formText"  style ="width:750px"> 
		           </div>
	            </td>                                 
            </tr>  
            <tr id="fpnn_tr" style="display:none">
            	<td colspan="4">           		
		           <div class="fitem">  
		                <label>发票内容:</label>  
						<input name="DD_FPNN" id="DD_FPNN" class="easyui-validatebox formText" style ="width:750px"> 
		           </div>   
	            </td> 
            </tr> 
            <tr>  
               <td>           
		           <div class="fitem">  
		                <label>课程数量:</label>  
						<input name="DD_SL" id="DD_SL" class="easyui-validatebox formText"  readOnly="readOnly">
		           </div>
	            </td>
	            <td>           
		           <div class="fitem">  
		                <label>总&nbsp;金&nbsp;额:</label>  
						<input name="DD_ZJE" id="DD_ZJE" class="easyui-validatebox formText"  readOnly="readOnly">
		           </div>  
	            </td>	           
	            <td>            		
		            <div class="fitem">  
		                <label>优惠编号:</label>  
		                <input name="DD_SYYHQ" id="DD_SYYHQ" class="easyui-combogrid formText" >  
		            </div> 
	            </td>
	             <td>           
		            <div class="fitem">
		                <label>折扣金额:</label>  
						<input class="easyui-validatebox formText"  id="DD_ZK" name="DD_ZK" readOnly="readOnly">
		           </div>   
	            </td>
            </tr>
            <tr>
            	<td>           
		            <div class="fitem">
		                <label>应&nbsp;&nbsp;&nbsp;&nbsp;付:</label>  
						<input class="easyui-validatebox formText"  id ="DD_YF" name="DD_YF"  readOnly="readOnly">
		           </div>
	            </td>
	            <td>            		
		            <div class="fitem">
		                <label>实&nbsp;&nbsp;&nbsp;&nbsp;付:</label>  
						<input class="easyui-validatebox formText"  id="DD_SF" name="DD_SF">
		           </div> 
	            </td>	
	            <td>           
		           <div class="fitem">  
		                <label>支付方式:</label>  
						<input class="easyui-combobox formText" id="DD_ZFFS" name="DD_ZFFS" data-options="valueField:'ITEM_KEY',textField:'text',url:'__URL__/getDictList?type=ZFFS'" > 
		           </div>
	            </td> 
	            <td>            
		           <div class="fitem">  
		                <label>订单状态:</label>  
						<input class="easyui-combobox formText" id="DD_DDZT" name="DD_DDZT" data-options="valueField:'ITEM_KEY',textField:'text',url:'__URL__/getDictList?type=DDZT'" required="true" missingMessage="不能为空">
		           </div>
	            </td>	            

            </tr>      
            <tr>	
	            <td colspan="1">            		
		            <div class="fitem">
		                <label>推&nbsp;荐&nbsp;人:</label>  
						<input class="easyui-combobox formText"   name="DD_TJR" id="DD_TJR" data-options="valueField:'id',textField:'text',url:'__URL__/getUserList/type/yg3'">
		            </div> 
	            </td>  	
	            <td colspan="3">           
		           <div class="fitem">
		                <label>备&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
		                <input class="easyui-validatebox formText"  name="DD_BZ" id="DD_BZ" style ="width:420px">
		               <!-- <textarea name="DD_BZ" style="height:60px;width:200px"></textarea> --> 
		            </div>  
	            </td>	
	       </tr> 
	        <tr>
            	<td colspan="5"> 
            	<div class="ftitle">报名课程明细</div>
	            	<div id="tb_orderDetail" style="padding:0px;height:auto;background:white">
					<div style="margin-bottom:0px">
					<table>
						<tr>
							<!--<td><a href="javascript:void(0)" class="easyui-linkbutton"  iconCls="icon-add" plain="true" onclick="addOrderDetail()">添加课程</a>  </td>
							<td><a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editOrderDetail()">修改课程</a> </td>  
							<td><a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="destroyOrderDetail()">删除课程</a></td>-->
						</tr>  
						</table>
					</div>
					</div>           	
            	</td>
            
            </tr>
            <tr>
	            <td colspan="5">
		       		<table id ="order_details_data" class="easyui-datagrid" style="overflow: hidden;height:auto;margin:0"
					data-options="rownumbers:false,pagination:false,singleSelect:false,url:'__URL__/readOrderDetails/',rowStyler:function(index,row,css){if(row.LS_TYPE=='1'){
					return 'color:red;font-weight:bold;'}}" >
						<thead>
						<tr>
							<th data-options="field:'LS_KCBH',fitColumns: true,width:80,align:'center',hidden:true">课程编号</th>
							<th data-options="field:'LS_KCMC',fitColumns: true,width:80,align:'center'">课程名称</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:80,align:'center'">课程价格</th>
							<th data-options="field:'LS_KCLX',fitColumns: true,width:80,align:'center'">课程类型</th>
							<th data-options="field:'LS_JSMC',itColumns: true,width:120,align:'center',hidden:true">教室名称</th>
							<th data-options="field:'LS_ZK',itColumns: true,width:60,align:'center'">折扣</th>
							<th data-options="field:'LS_SL',itColumns: true,width:80,align:'center'">报名人数</th>
							<th data-options="field:'LS_YFJE',itColumns: true,width:80,align:'center'">应付金额</th>
							<th data-options="field:'LS_SRQ',itColumns: true,width:80,align:'center',hidden:true">上课日期</th>
							<th data-options="field:'LS_STIME',itColumns: true,width:60,align:'center',hidden:true">上课时间</th>
							<th data-options="field:'LS_ETIME',itColumns: true,width:60,align:'center',hidden:true">下课时间</th>
						</tr>
						</thead>
					</table>
	            </td>
            </tr>                                                                  
            </table>            
        </form>  
    </div>  
    <div id="dlg_order_buttons">  
        <!-- <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="confirmPayOrder()">缴费</a>  -->
        <a id="printButton" href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" onclick="printOrder()">打印</a>
        <a id="closeButton" href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg_order').dialog('close')">关闭</a>
    </div>
    
    
  	<!-- 报名单课程 --> 
  	<div id="dlg_order_detail" class="easyui-dialog" style="width:760px;height:0px;padding:10px 20px" data-options="resizable:true,modal:true" 
            closed="true" buttons="#dlg_order_detail_buttons">  
	    <div class="ftitle">课程列表</div>
		<table id="course_data_list" class="easyui-datagrid" style="width:720px;height:450px"  data-options="border:true,striped:true,nowrap:false,fit:true,rownumbers:true,pagination:true,singleSelect:false,url:'__URL__/getCourseList/'" >  
		    <thead>  
		        <tr>  
		       	    <th data-options="field:'checkbox',checkbox:true" id="checkedAllCourse"></th>
					<th data-options="field:'Id',fitColumns: true,hidden:true">Id</th>
					<th data-options="field:'KC_BJMC',itColumns: true,width:100,align:'center'">课程名称</th>
					<th data-options="field:'KC_KCFY',itColumns: true,width:80,align:'center'">课程价格</th>
					<th data-options="field:'KMBH',itColumns: true,width:80,hidden:true,align:'center'">科目编号</th>	
					<th data-options="field:'KMMC',itColumns: true,width:80,align:'center'">科目</th>					
					<th data-options="field:'KC_ZRS',itColumns: true,width:60,align:'center'">总人数</th>
					<th data-options="field:'KC_YBRS',itColumns: true,width:60,align:'center'">已报人数</th>
					<th data-options="field:'KC_ZK',itColumns: true,width:60,align:'center'">折扣</th>
					<th data-options="field:'KC_SRQ',itColumns: true,width:80,align:'center'">上课日期</th>
					<th data-options="field:'KC_STIME',itColumns: true,width:60,align:'center'">上课时间</th>
					<th data-options="field:'KC_ETIME',itColumns: true,width:60,align:'center'">下课时间</th>
		        </tr>  
		    </thead>  
		</table>  
    </div>     
    
    <div id="dlg_order_detail_buttons">  
      <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveOrderDetail()">确定</a>   
      <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg_order_detail').dialog('close')">取消</a>  
   </div>
   
   <DIV ID="printArea" style="display:none">
   <div style="font-size:20px;font-weight:bold; padding:5px 0;margin-bottom:15px;border-bottom:1px solid #ccc;text-align :center;margin-top:30px">知音学校收据</div>
        <table width="100%" cellpadding="0" border="0">
            <tr>
	            <td>            
		            <div class="fitem">  
		                <label>收费日期:</label>  
		                <input name="DD_KHMC1" id="DD_KHMC1" value="2013-08-09" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:100px" >  
		            </div>    
	            </td>
	            <td style="padding:0px 0px 5px 280px;border:0px;">           
		             <div class="fitem">  
		                <label>订单号:</label>  
		               <input name="DD_KHBH1" id="DD_KHBH1" value="WCXQ201306001" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:100px">  
		            </div>  
	            </td>         
            </tr>    
            <tr>
	            <td>            
		            <div class="fitem">  
		                <label>学生姓名:</label>  
		                <input name="DD_KHMC1" id="DD_KHMC1" value="张有强" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:100px" >  
		            </div>    
	            </td>
	            <td style="padding:0px 0px 5px 280px;border:0px;">           
		             <div class="fitem">  
		                <label>经手人:</label>  
		               <input name="DD_KHBH1" id="DD_KHBH1" value="张三" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:100px">  
		            </div>  
	            </td>         
            </tr> 
            <tr align="left">
	            <td colspan="2" style="padding:10px 0px 10px 0px;" >
		       		<table width="100%" border="1" cellpadding="5" cellspacing="0px" style="border-collapse:collapse">
						<thead>
						<tr align="left">
							<th data-options="field:'LS_KCMC',fitColumns: true,width:150,align:'center'">课程名称</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'">单位</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'">数量</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'">单价</th>
							<th data-options="field:'LS_ZK',itColumns: true,width:100,align:'center'">折扣</th>
							<th data-options="field:'LS_YFJE',itColumns: true,width:100,align:'center'">应付金额</th>
						</tr>
						<tr align="left">
							<th data-options="field:'LS_KCMC',fitColumns: true,width:150,align:'center'">奥数培训</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'">期</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'">1</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'">1000</th>
							<th data-options="field:'LS_ZK',itColumns: true,width:100,align:'center'">100</th>
							<th data-options="field:'LS_YFJE',itColumns: true,width:100,align:'center'">900</th>
						</tr>
						<tr align="left">
							<th data-options="field:'LS_KCMC',fitColumns: true,width:150,align:'center'">英语口语</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'">期</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'">1</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'">2000</th>
							<th data-options="field:'LS_ZK',itColumns: true,width:100,align:'center'">200</th>
							<th data-options="field:'LS_YFJE',itColumns: true,width:100,align:'center'">1800</th>
						</tr>
						<tr align="left">
							<th data-options="field:'LS_KCMC',fitColumns: true,width:150,align:'center'">合计</th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'"></th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'"></th>
							<th data-options="field:'LS_KCJG',fitColumns: true,width:100,align:'center'"></th>
							<th data-options="field:'LS_ZK',itColumns: true,width:100,align:'center'">300</th>
							<th data-options="field:'LS_YFJE',itColumns: true,width:100,align:'center'">2700</th>
						</tr>
						</thead>
					</table>
	            </td>
            </tr>  
	       <tr>
	       <td></td>
	       	  <td style="padding:0px 0px 0px 280px;border:0px;">           
		           <div class="fitem">
		                <label>收款金额:</label>
		                <input name="DD_KHMC1" id="DD_KHMC1" value="2000.00" style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000;width:100px" >  
		            </div>  
	            </td>	
	       </tr>                                                                                  
            </table>  
        </DIV>
</body>
</html>